package com.hsj.goldstore.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

import com.hsj.goldstore.base.BaseMvpFrament;

import java.util.List;

/**
 * 作者：Mr.Hsj on 2017/10/12.
 * 邮箱：1872973076@qq.com
 * class：
 */

public class ViewpageChangeAdapter extends FragmentStatePagerAdapter {

    private List<BaseMvpFrament> fragments;

    public ViewpageChangeAdapter(FragmentManager fm, List<BaseMvpFrament> fragments) {
        super(fm);
        this.fragments = fragments;
    }

    @Override
    public Fragment getItem(int position) {
        return fragments.get(position);
    }

    @Override
    public int getCount() {
        return fragments.size();
    }

}
